import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopSkuAttrsController } from '../../../controllers';
const uctoominishopSkuAttrsRouter = new Router();
const minishopSkuAttrsController = new uctooMinishopSkuAttrsController();

uctoominishopSkuAttrsRouter.post('/add', requireUser, minishopSkuAttrsController.add);
uctoominishopSkuAttrsRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_sku_attrs'), minishopSkuAttrsController.edit);
uctoominishopSkuAttrsRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_sku_attrs'), minishopSkuAttrsController.delete);

//For getting minishopSkuAttrs with permission control
uctoominishopSkuAttrsRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_sku_attrs'), minishopSkuAttrsController.getSingle);
uctoominishopSkuAttrsRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_sku_attrs'), minishopSkuAttrsController.getMany);
uctoominishopSkuAttrsRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_sku_attrs'), minishopSkuAttrsController.getMany);

//#endregion AutoCreateCode
export default uctoominishopSkuAttrsRouter;
